package com.resrun.vo.request;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

/**
 * 证书申请请求参数
 *
 * @author hupan
 * @since 2024-01-23
 */
@Data
public class CARequestRequest {

    @NotNull(message = "证书类型不能为空")
    @Range(min = 1, max = 2, message = "证书类型不正确")
    private Byte certType;

    @Range(min = 1)
    private Long userId;

    @Range(min = 1)
    private Long enterpriseId;

    @NotBlank(message = "通用名称不能为空")
    private String commonName;

    @NotBlank(message = "国家名称不能为空")
    private String country;

    @NotBlank(message = "组织名称不能为空")
    private String organization;

    private String organizationUnit;

    private String province;

    private String locality;

    private String email;

}
